Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
loading="lazy" but for html5 videos

I'm making a scroll-able gallery with flask that shows many<video> elements, the video files are small but it still generates a lot of http 206 requests, which are bottle-necking flask.

<img> has loading="lazy", which is very convenient.

Is there some way, javascript only or css, to implement such behavior but for <video>?

I may use preload="none", but it won't display the first video frame.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you may use a part of this solution :

<video preload="none" src="video.mp4" 
       autoplay="false" poster="poster.jpg"
       muted="false" loop="false">
</video>

If preload is none, the web browser don't preload the media, but i advice to replace an image with poster attribute.

Preload explanation here

autoplay explanation here

loop explanation here

poster explanation here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda